package com.wuye;

import com.wuye.web.complaint.po.UserComplaint;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;

import javax.annotation.Resource;
import java.util.List;

@SpringBootTest
public class MongoDB_test {
    @Resource
    private MongoTemplate mongoTemplate;
    @Test
    public void findTest(){
        Query query = new Query();
        List<UserComplaint> userComplaintList = mongoTemplate.find(query, UserComplaint.class);
        System.out.println(userComplaintList);
    }
}
